package com.houtai.controller.activity.comments;


import com.houtai.authority.Authority;
import com.houtai.authority.AuthorityType;
import com.houtai.bean.dto.activity.comments.TdActivityCommentsListDto;
import com.houtai.service.activity.comments.ActivityCommentsService;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;


@Controller
@RequestMapping(value = {"v5"})
public class ActivityCommentsController {


    @Resource
    private ActivityCommentsService activityCommentsService;



    /**
     * @Purpose  查找活动评论列表
     * @param
     * @version  3.4.0
     * @author   lizhun
     * @time     2018-07-10
     * @return   ModelAndView
     */
    @Authority(AuthorityType.Login)
    @RequestMapping(value = "/activity/comments/list")
    public ModelAndView comments(HttpServletRequest request,TdActivityCommentsListDto dto) {
        ModelAndView mv = new ModelAndView("activity/comments/list");
        mv.addObject("token", request.getParameter("token"));
        mv.addObject("retInfo", activityCommentsService.commentsList(request, dto));
        return mv;
    }
}
